<?php

namespace app\validate;

use think\Validate;

class TaskWorkOrderReportsValidate extends Validate
{

    /**
     * 工单不同环节下的问题数据计算
     */
    public function sceneCountTaskWorkOrderProportion(): TaskWorkOrderReportsValidate
    {
        return $this->append([
            'param' => 'require|array',
            'param.project_id' => 'require|array',
            'param.time' => 'require|array',
            'param.step_category_id' => 'array',
        ]);
    }
    // 验证工单统计数量自定义
    public function sceneCountTaskWorkOrderNumberDiffByStatus():TaskWorkOrderReportsValidate
    {
        return $this->append([
            'param' => 'require|array',
            'param.project_id' => 'require|array',
            'param.time' => 'require|array',
            'param.step_category_id' => 'array',
        ]);

    }
    // 自定义工单统计验证
    public function sceneGetTaskWorkOrderReports():TaskWorkOrderReportsValidate
    {
        return $this->append([
            'param' => 'require|array',
            'param.project_id' => 'require|array',
            'param.time' => 'require|array',
            'param.step_category_id' => 'array',
            'param.category_id' => 'array',
            'page' => 'require|array',
        ]);

    }

    // 指定环节工单问题数量验证
    public function sceneCountTaskWorkOrderByStepCategoryId():TaskWorkOrderReportsValidate
    {
        return $this->append([
            'param' => 'require|array',
            'param.project_id' => 'require|array',
            'param.time' => 'require|array',
            'param.step_category_id' => 'array'
        ]);

    }
}
